import request from "@/utils/request";

// 运输列表
export function getTransportList(params, page = 1, pageSize = 10) {
  return request({
    url: `/orderTransport/list?pageNo=${page}&pageSize=${pageSize}`,
    method: "post",
    data: params,
  });
}

// 获取快递面单pdf
export function getOrderTransportPdf(wayBillCode) {
  return request({
    url: `/orderTransport/render4Outer?wayBillCode=${wayBillCode}`,
    method: "get",
  });
}

// 订单物流详情
export function getTransportDetail(wayBillCode) {
  return request({
    url: `/orderTransport/commonGetOrderTraceV1?wayBillCode=${wayBillCode}`,
    method: "get",
  });
}

// 商家改约定
export function merchantModify(params) {
  return request({
    url: `/merchant/merchantModify`,
    method: "post",
    data: params,
  });
}

// 商家改约定
export function cancelTransport(params) {
  return request({
    url: `/orderTransport/cancelTransport`,
    method: "get",
    params: params,
  });
}

